<template>
  <navbar>
    <div slot="center">购物车({{ lengh }})</div>
  </navbar>
</template>

<script>
import navbar from "components/common/navbar/navbar.vue";
import { mapGetters } from "vuex";
export default {
  name: "cartnavbarshow",
  components: {
    navbar,
    scroll,
  },
  computed: {
    //两种方法
    // ...mapGetters(["cartLength", "cartList"]),
    ...mapGetters({
      lengh: "cartLength",
      list: "cartList",
    }),
  },
};
</script>

<style  scoped>
</style>